/*
 * Copyright (c) 2023, LXMS (lxinet.cn).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package cn.lxinet.lxms.generator;

import cn.lxinet.lxms.generator.domain.GeneratorParams;

import java.util.ArrayList;
import java.util.List;

/**
 * 配置生成信息和需要生成代码的表
 *
 * @author zcx
 * @date 2023/07/04
 */
public class Config {
    /**
     * mysql版本，8为8.x，5为5.x
     */
    public static final Integer MYSQL_VERSION = 8;
    /**
     * 8.x版本驱动，非必要不要改
     */
    public static final String DRIVER8 = "com.mysql.cj.jdbc.Driver";
    /**
     * 5.x版本驱动，非必要不要改
     */
    public static final String DRIVER5 = "com.mysql.jdbc.Driver";
    /**
     * 数据库IP
     */
    public static final String IP = "127.0.0.1";
    /**
     * 数据库端口
     */
    public static final String PORT = "3306";
    /**
     * 数据库
     */
    public static final String DATABASE = "lxms";
    /**
     * 数据库用户名
     */
    public static final String USERNAME = "root";
    /**
     * 数据库密码
     */
    public static final String PASSWORD = "root";
    /**
     * 作者
     */
    public static final String AUTHOR = "zcx";
    /**
     * 生成代码输出模块
     */
    public static final String OUT_MODULE = "lxms-modules/lxms-module-system";

    public static List<GeneratorParams> tableList = new ArrayList<>();
    static {
        String packageName = "cn.lxinet.lxms";
        String moduleName = "system";

        //添加需要生成代码的表，4个参数分别是 基础包名、模块名、表名、表注释，生成的实际包名为：基础包名+模块名
        //如 基础包名：cn.lxinet.lxms，模块名：system，生成的实际包名：cn.lxinet.lxms.system
        tableList.add(new GeneratorParams(packageName, moduleName, "sys_tenant", "租户"));

    }
}
